package com.tfswue.qmp.listener;

import jakarta.servlet.http.HttpSessionEvent;
import jakarta.servlet.http.HttpSessionListener;

import org.slf4j.Logger;

public class MySessionListener implements HttpSessionListener {
private static final Logger log = org.slf4j.LoggerFactory.getLogger(MySessionListener.class);
    @Override
    public void sessionCreated(HttpSessionEvent se) {
       log.info("会话已创建，Session ID:{}",se.getSession().getId());
       //可以在这里进行会话创建后的操作
    }

    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
       log.info("会话已销毁，Session ID:{}",se.getSession().getId());
       //可以在这里进行会话销毁后的操作
    }
}
